package ph.loong.deliveryman.ui.account

import android.os.Bundle
import android.support.v4.app.Fragment
import com.qmuiteam.qmui.util.QMUIStatusBarHelper
import deliveryman.loong.ph.deliveryman.R
import kotlinx.android.synthetic.main.activity_login.*
import ph.loong.deliveryman.adapter.LoginFragmentAdapter
import ph.loong.deliveryman.base.BaseActivity
import ph.loong.deliveryman.fragment.account.CodeLoginFragment
import ph.loong.deliveryman.fragment.account.PwdLoginFragment
import java.util.*

class LoginActivity : BaseActivity() {
    private var loginFragments: MutableList<Fragment> = ArrayList()


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_login)
        QMUIStatusBarHelper.setStatusBarLightMode(this)
        QMUIStatusBarHelper.translucent(this, resources.getColor(R.color.red_statu_bar_color))
        initFragment()
        initView()
    }


    private fun initFragment() {
        loginFragments.add(PwdLoginFragment())
        loginFragments.add(CodeLoginFragment())
        val fragmentAdapter = LoginFragmentAdapter(supportFragmentManager, loginFragments)
        login_viewPager.adapter = fragmentAdapter
        login_tableLayout.setupWithViewPager(login_viewPager)
    }

    private fun initView() {

    }

}
